﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Admin.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<%@ Import Namespace="CourseSystem.Common.Helpers" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    用户管理
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <% Html.RenderPartial("AdminTopUc", "用户管理"); %>
     <table width="100%" border="0" cellpadding="0" cellspacing="1" class="table03">
        <tr class="box03">
            <td height="28" colspan="4" align="center">
                <div align="right">
                </div>
                <div align="center">
                     <%--<input type="button" id="btnAdd" value="新增" />--%>
                     <%=Html.ActionButton("新增","UserEdit") %>
                </div>
            </td>
        </tr>
    </table>
    <table width="100%" height="5" border="0" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF">
        <tr>
            <td height="5" bgcolor="#FFFFFF">
            </td>
        </tr>
    </table>
    <div id="listDiv">
        <% Html.RenderAction("UserListUc"); %>
    </div>
    <div id="editDiv" title="编辑用户">
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HeaderContent" runat="server">
    <script type="text/javascript">
        $(function () {
          $("#editDiv").dialog({
                autoOpen: false,
                height: 300,
                width: 400,
                modal: true,
                close: function () {
                    window.location.reload();
                }
            });
            

            $("#btnAdd")
			.click(function () {
			    $("#editDiv").html("loading...");
			    $("#editDiv").load(appRoot + 'Manage/UserEditUc/?rd='+rdTime());
			    $("#editDiv").dialog("open");
			});

        });

        var editClickA = function (id) {
            $("#editDiv").html("loading...");
            $("#editDiv").load(appRoot + 'Manage/UserEditUc/' + id + "?rd="+rdTime());
            $("#editDiv").dialog("open");
        };

    </script>
</asp:Content>
